package com.ioidea.holland.en

enum class EnumControlType(var controlType:Int,var controlTypeName:String) {


    CONTROL_TYPE_SINGLE(1,"单控"),
    CONTROL_TYPE_GROUP(2,"组控"),
    CONTROL_TYPE_ALL(0 ,"群控");

    companion object {
        fun ofCode(controlType: Int): EnumControlType {
            val enumControlTypes = EnumControlType.values();
            for (enumControlType in enumControlTypes) {
                if (enumControlType.controlType == controlType) {
                    return enumControlType
                }
            }

            return CONTROL_TYPE_GROUP
        }
    }

}